---
layout: docs
page_title: 'nomad acl policy apply command reference'
description: |
  The `nomad acl policy apply` command creates or updates an  access control list (ACL) policy. Set description, job, namespace, group, and task.
---

# `nomad acl policy apply` command reference

The `acl policy apply` command is used to create or update ACL policies.

## Usage

```plaintext
nomad acl policy apply [options] <name> <path>
```

The `acl policy apply` command requires two arguments, the policy name and path
to file. The policy can be read from stdin by setting the path to "-".

This command requires a management ACL token.

## Options

- `-description`: Sets the human readable description for the ACL policy.

- `-job`: Attaches the policy to the specified job. Requires that `-namespace` is
    also set. Refer to [Workload Associated ACL Policies][] for more details.

- `-namespace`: Attaches the policy to the specified namespace. Requires that
    `-job` is also set.

- `-group`: Attaches the policy to the specified task group. Requires that
    `-namespace` and `-job` are also set.

- `-task`: Attaches the policy to the specified task. Requires that `-namespace`,
    `-job` and `-group` are also set.


## Examples

Create a new ACL Policy:

```shell-session
$ nomad acl policy apply my-policy my-policy.json
Successfully wrote 'my-policy' ACL policy!
```

Associate an ACL Policy with a specific task:

```shell-session
$ nomad acl policy apply \
    -namespace default -job example -group cache -task redis \
    my-policy my-policy.json
Successfully wrote 'my-policy' ACL policy!
```

## General options

@include 'general_options_no_namespace.mdx'

[Workload Associated ACL Policies]: /nomad/docs/concepts/workload-identity#workload-associated-acl-policies
